.\" Licensed under the Apache License, Version 2.0 (the "License");
.\" you may not use this file except in compliance with the License.
.\" You may obtain a copy of the License at
.\"
.\" http://www.apache.org/licenses/LICENSE-2.0
.\"
.\" Unless required by applicable law or agreed to in writing, software
.\" distributed under the License is distributed on an "AS IS" BASIS,
.\" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
.\" See the License for the specific language governing permissions and
.\" limitations under the License.
.na
.TH J2OBJC "1" "May 2014" "j2objc" "User Commands"
.SH NAME
.B j2objc
\- translate Java source files to Objective-C
.SH SYNOPSIS
.B j2objc
[
.I options
] \fIfile1.java\fR ...
.SH DESCRIPTION
The
.B j2objc
tool translates specified Java source files into either Objective-C or
Objective-C++ sources for use in an iOS application.

.SH COMMON OPTIONS
.TP \w'\fB\-copyright\fP\fI\ nnnn\fP'u+10n
.BI \-sourcepath " path "
Specify where to find input source files
.TP
.BI \-classpath " path "
Specify where to find user class files
.TP
.BI \-d " directory "
Specify where to place generated Objective\-C files
.TP
.BI \-encoding " encoding "
Specify character encoding used by source files
.TP
.BI \-source " release "
Provide source compatibility with specified release
.TP
.BI \-g
Generate debugging support
.TP
\fB\-q\fR, \fB\-\-quiet\fR
Do not print status messages
.TP
\fB\-v\fR, \fB\-\-verbose
Output messages about what the translator is doing
.TP
.BI \-Werror
Make all warnings into errors
.TP
\fB\-h\fR, \fB\-\-help\fR
Print this message.

.SH TRANSLATION OPTIONS
.TP
\fB\-batch-translate-max\fR\=\fIn\fR
The maximum number of source files that are translated together. Batching
speeds up translation, but requires more memory.
.TP
.BI \-\-build\-closure
Translate dependent classes if out-of-date.
.TP
.BI \-\-dead\-code\-report " file "
Specify a ProGuard usage report for dead code elimination.
.TP
.BI \-\-disallow\-inherited\-constructors
Issue compiler warnings when native code accesses inherited constructors.
.TP
.BI \-\-doc\-comments
Translate Javadoc comments into Xcode-compatible comments.
.TP
.BI \-\-no\-extract\-unsequenced
Don't rewrite expressions that would produce unsequenced modification errors.
.TP
.BI \-\-generate\-deprecated
Generate deprecated attributes for deprecated methods, classes, and interfaces.
.TP
.BI \-\-mapping " file "
Add a method mapping file.
.TP
.BI \-\-no\-class\-methods
Don't emit class methods for static Java methods.
(static methods are converted to functions)
.TP
.BI \-\-nullability
Converts Nullable and Nonnull annotations to Objective-C.
.TP
.BI \-\-no\-package\-directories
Generate output files to specified directory, without creating package sub-directories.
.TP
.BI \-\-prefix " package=prefix "
Substitute a specified prefix for a package name.
.TP
.BI \-\-prefixes " file "
Specify a properties file with prefix definitions.
.TP
.BI \-\-preserve\-full\-paths
Generates output files with the same relative paths as the input files.
.TP
.BI \-processor " class"[, "class..."]
Names of the annotation processors to run; bypasses default discovery process.
.TP
.BI \-processorpath " path "
Specify where to find annotation processors.
.TP
\fB\-\-no\-segmented\-headers\fR
Do not generate headers with guards around each declared type.
.TP
.BI \-\-static\-accessor\-methods
Generates accessor methods for static variables and enum constants.
.TP
.BI \-\-strip\-gwt\-incompatible
Removes methods that are marked with a GwtIncompatible
annotation, unless its value is known to be compatible.
.TP
.BI \-\-strip\-reflection
Do not generate metadata needed for Java reflection.
.TP
.BI \-\-swift\-friendly
Generate code that facilitates Swift importing.
.TP
\fB\-t\fR, \fB\-\-timing\-info\fR
Print time spent in translation steps.
.TP
.BI \-use\-arc
Generate Objective\-C code to support Automatic Reference Counting (ARC).
.TP
.BI \-use\-gc
Generate Objective\-C code to support garbage collection (requires
libjre_emul.a rebuild).
.TP
.BI \-use\-reference\-counting
Generate Objective\-C code to support iOS manual reference counting (default).
.TP
\fB-version\fR
Version information.
.TP
.BI \-x " language "
Specify what language to output.  Possible values are objective\-c (default)
and objective\-c++.
.TP
.BI \-X
Displays information about nonstandard options and exits.

.SH NONSTANDARD OPTIONS
.TP
.BI \-Xbootclasspath\fR:\fIpath
Boot path used by translation (not the tool itself).
.TP
.BI \-Xlint
Enable recommended warnings. In this release, all available warnings are recommended.
.TP
.BI \-Xlint:none
Disable all warnings not mandated by the Java Language Specification.
.TP
.BI \-Xlint:- xxx
Disable warning \f2xxx\fR, where \f2xxx\fR is one of the warning 
names supported for \f3\-Xlint:\f2xxx\fR, below.
.TP
.B \-Xlint:cast 
Warn about unnecessary and redundant cast expressions.
.TP
.B \-Xlint:deprecation
Warn about the use of deprecated items. 
.TP
.B \-Xlint:dep-ann
Warn about items that are documented with an @deprecated Javadoc comment, 
but do not have a @Deprecated annotation.
.TP
.B \-Xlint:empty
Warn about empty statements. 
.TP
.B \-Xlint:fallthrough 
Check switch blocks for fall-through cases and provide a 
warning message for any that are
found. 
.TP
.B \-Xlint:finally
Warn about finally clauses that cannot complete normally. 
.TP
.B \-Xlint:rawtypes
Warn about unchecked operations on raw types. 
.TP
.B \-Xlint:serial
Warn about missing serialVersionUID definitions on serializable classes. 
.TP
.B \-Xlint:static
Warn about serial methods called on instances. 
.TP
.B \-Xlint:unchecked 
Give more detail for unchecked conversion warnings 
that are mandated by the Java Language Specification. 
.TP
.B \-Xlint:varargs
Warn about unsafe usages of variable arguments (varargs) methods, 
in particular, those that contain non-reifiable arguments.
.TP
.BI \-Xno\-jsni\-warnings
Warn if JSNI (GWT) native code delimiters are used instead of OCNI delimiters.
.TP
.BI \-\J<flag>
Pass <flag> directly to the Java runtime.

.SH "SEE ALSO"
.BR j2objcc (1)
.PP
The full documentation for
.B j2objc
is maintained on the project site at
\fIhttp://j2objc.org/\fR.
